<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>17_flex布局</title>
    <link rel="stylesheet" href="./css/basic.css">
    <style>
        .container {
            display: flex;
            flex-direction: row;
            /* 居中对齐 */
            /* justify-content: center; */
            /* 间隔相等 */
            /* justify-content: space-around; */
            /* 两头对其 */
            /* justify-content: space-between; */
            /* 均分 */
            justify-content: space-evenly;
        }
        
        .item {
            width: 100px;
            height: 100px;
            background-color: pink;
            margin: 0 10px;
            font-size: 30px;
            color: white;
            display: flex;
            justify-content: center;
            align-items: center;
            /* text-align: center;
            line-height: 100px; */
        }
        
        .container :nth-child(1),
        .container :nth-child(6) {
            flex: 1;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
        <div class="item">5</div>
        <div class="item">6</div>
    </div>
</body>

</html>